home *** CD-ROM | disk | FTP | other *** search
- function loadImage(mc, node, extrapath)
- {
- var _loc3_ = extrapath;
- if(_loc3_ == null)
- {
- _loc3_ = "";
- }
- var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
- var _loc1_ = node.firstChild.nodeValue;
- var _loc2_ = node.attributes.path;
- if(_loc2_ != null)
- {
- _loc1_ = _loc2_ + _loc1_;
- }
- else
- {
- _loc1_ = strDefaultPath + _loc3_ + _loc1_;
- }
- if(strPathPrefix == null)
- {
- strPathPrefix = "";
- }
- mc.loadMovie(strPathPrefix + _loc1_);
- }
- function addLink(mc)
- {
- Links[mc.link] = mc;
- }
- function getMCfromLink(Item)
- {
- var _loc1_ = Item;
- if(Links[_loc1_] == null)
- {
- var _loc2_ = [];
- while(_loc1_ != sideMenu.ItemHome)
- {
- _loc2_.unshift(_loc1_._name.split("_").pop());
- _loc1_ = _loc1_._parent._parent;
- }
- var _loc3_ = _loc2_.join("/");
- Links[_loc1_] = Links[_loc3_];
- }
- return Links[_loc1_];
- }
- function removeLinkListener()
- {
- Tardis.sideMenu.EB.removeListener(this);
- }
- function init()
- {
- build();
- }
- function build()
- {
- var strID = Tardis.ActiveSection.id;
- var Colors = Tardis.Colors;
- strSECTION_COLOR = Colors.getString(strID);
- SECTION_COLOR = Colors.getHex(strID);
- SECTION_COLOR50 = Colors.getHex(strID + "50");
- DEFAULT_COLOR = Colors.getHex("default");
- IMAGE_PATH = nodeData.attributes.imagepath;
- var ndTitle = nodeData.byName("title");
- if(ndTitle.getText() != null)
- {
- titleFF.htmlText = "<FONT COLOR=\"" + strSECTION_COLOR + "\">" + ndTitle.getText() + " </FONT>";
- titleFF.resize();
- titleFF._y = TEXT_POS - 7;
- TEXT_POS += titleFF._height - 6;
- }
- ndExtras = nodeData.byName("items");
- var arrClips = [];
- var n = 0;
- var ndExtra;
- var n = 0;
- while(n < ndExtras.childNodes.length)
- {
- ndExtra = ndExtras.childNodes[n];
- this.attachMovie("extrasListingMC","mc_t_" + (n + 1),++depth);
- objClip = eval("mc_t_" + (n + 1));
- objClip._x = 8;
- objClip.link = link = ndExtra.attributes.link;
- objClip.navLink = true;
- objClip.num = n;
- objClip.imageRoll = false;
- if(ndExtra.byName("print").getText() != null)
- {
- objClip.printImage = ndExtra.byName("print").getText();
- }
- if(ndExtra.byName("image").getText() != null)
- {
- objClip.imageRoll = true;
- }
- objClip.titleFF.htmlText = ndExtra.byName("title").getText();
- objClip.titleFF.textColor = DEFAULT_COLOR;
- objClip.titleFF.resize();
- objClip.titleFF._y = CONTENT_POS;
- objClip.btn._width = objClip.titleFF._width;
- objClip.btn._height = objClip.titleFF._height;
- objClip.bodyFF.htmlText = ndExtra.byName("body").getText();
- objClip.bodyFF.textColor = DEFAULT_COLOR;
- objClip.bodyFF.resize();
- objClip.bodyFF._y = CONTENT_POS + objClip.titleFF._height - 9;
- arrClips.push(objClip);
- n++;
- }
- var ndBodyLink = nodeData.byName("bodylink");
- if(ndBodyLink.byName("label").getText() != null)
- {
- animatedLink = false;
- bodyLinkMC.printable = false;
- bodyLinkMC.contentFF.htmlText = ndBodyLink.byName("label").getText();
- bodyLinkMC.contentFF.textColor = SECTION_COLOR50;
- var arwColor = new Color("bodyLinkMC.arrowMC.arwHolder");
- bodyLinkMC.arrowMC.arwColor.setRGB(SECTION_COLOR50);
- bodyLinkMC.link = ndBodyLink.attributes.link;
- bodyLinkMC.navLink = true;
- bodyLinkMC.contentFF.autoSize = true;
- bodyLinkMC.btn._width = bodyLinkMC.contentFF._width + bodyLinkMC.arrowMC._x - 20;
- bodyLinkMC.arrowMC._x = bodyLinkMC.contentFF._x + bodyLinkMC.contentFF._width + 1;
- bodyLinkMC.mAnimatedLink._visible = false;
- }
- else if(ndBodyLink.byName("label_animated").getText() != null)
- {
- animatedLink = true;
- bodyLinkMC.printable = false;
- var arrLabels = ndBodyLink.byName("label_animated").getText().split("|");
- bodyLinkMC.arrowMC._visible = false;
- bodyLinkMC.mAnimatedLink.bigText = arrLabels[0];
- bodyLinkMC.mAnimatedLink.smallText = arrLabels[1];
- bodyLinkMC.mAnimatedLink.linkColor = SECTION_COLOR50;
- bodyLinkMC.mAnimatedLink._visible = true;
- bodyLinkMC.link = ndBodyLink.attributes.link;
- bodyLinkMC.navLink = true;
- bodyLinkMC.btn._width = bodyLinkMC.contentFF._width + bodyLinkMC.arrowMC._x - 20;
- }
- else
- {
- bodyLinkMC.arrowMC._visible = false;
- bodyLinkMC._y = 385;
- bodyLinkMC._height = 0;
- bodyLinkMC._visible = false;
- bodyLinkMC.btn.enabled = false;
- }
- ndItems = nodeData.byName("items");
- ndDefault = nodeData.byName("items").firstChild;
- var ndImage = ndDefault.byName("image");
- if(ndImage.getText() != null)
- {
- loadFader();
- intervalID = setInterval(checkLoad,300);
- }
- else
- {
- positionExtras();
- }
- onComplete();
- }
- function loadFader()
- {
- var _loc1_ = this;
- _loc1_.createEmptyMovieClip("mc_images",++depth);
- mc_images.onReady = function()
- {
- var _loc1_ = this;
- _loc1_.nodeData = _loc1_._parent.ndItems;
- _loc1_.strPathPrefix = _loc1_._parent.strPathPrefix;
- _loc1_.init();
- };
- mc_images.loadMovie(strPathPrefix + Tardis.ENGINE_FOLDER + "modules/preview_nofade.swf");
- }
- function checkLoad()
- {
- if(mc_images._height > 0)
- {
- if(!positioned)
- {
- positioned = true;
- positionExtras();
- clearInterval(intervalID);
- }
- }
- }
- function positionExtras()
- {
- mc_images._y = TEXT_POS;
- TEXT_POS += mc_images._height;
- n = 0;
- while(n < ndExtras.childNodes.length)
- {
- objClip = eval("mc_t_" + (n + 1));
- objClip._y = TEXT_POS;
- TEXT_POS += 62;
- n++;
- }
- mc_t_1.btn._height += mc_images._height;
- mc_t_1.btn._y -= mc_images._height;
- _visible = true;
- }
- function txtOver(mc)
- {
- var _loc1_ = mc;
- Tardis.sideMenu.doOver(_loc1_.link);
- if(_loc1_.imageRoll)
- {
- mc_images.doOver(_loc1_.num);
- }
- if(_loc1_ == bodyLinkMC)
- {
- if(animatedLink)
- {
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.txtLabel.textColor = SECTION_COLOR;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText2.contentFF.textColor = SECTION_COLOR;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.arrowMC.gotoAndStop("on");
- temp.text = bodyLinkMC.mAnimatedLink.mBuyOnlineText.arrowMC;
- }
- else
- {
- bodyLinkMC.arrowMC.gotoAndStop("on");
- bodyLinkMC.contentFF.textColor = SECTION_COLOR;
- }
- }
- }
- function txtOut(mc)
- {
- var _loc1_ = mc;
- Tardis.sideMenu.doOut(_loc1_.link);
- if(_loc1_.imageRoll)
- {
- mc_images.doOut(_loc1_.num);
- }
- if(_loc1_ == bodyLinkMC)
- {
- if(animatedLink)
- {
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.txtLabel.textColor = SECTION_COLOR50;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText2.contentFF.textColor = SECTION_COLOR50;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.arrowMC.gotoAndStop("off");
- }
- else
- {
- bodyLinkMC.arrowMC.gotoAndStop("off");
- bodyLinkMC.contentFF.textColor = SECTION_COLOR50;
- }
- }
- }
- function txtUp(mc)
- {
- var _loc1_ = mc;
- if(_loc1_.printImage != null)
- {
- printImage(_loc1_.printImage);
- }
- if(_loc1_.link == "print")
- {
- printImage(_loc1_.link);
- }
- else
- {
- Tardis.sideMenu.doUp(_loc1_.link);
- }
- }
- function doOver(num)
- {
- if(bodyLinkMC.link == num)
- {
- if(animatedLink)
- {
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.txtLabel.textColor = SECTION_COLOR;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText2.contentFF.textColor = SECTION_COLOR;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.arrowMC.gotoAndStop("on");
- }
- else
- {
- bodyLinkMC.contentFF.textColor = SECTION_COLOR;
- bodyLinkMC.arrowMC.gotoAndStop("on");
- }
- }
- else
- {
- var mc = eval("mc_t_" + num);
- mc.titleFF.textColor = SECTION_COLOR;
- }
- }
- function doOut(num)
- {
- if(bodyLinkMC.link == num)
- {
- if(animatedLink)
- {
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.txtLabel.textColor = SECTION_COLOR50;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText2.contentFF.textColor = SECTION_COLOR50;
- bodyLinkMC.mAnimatedLink.mBuyOnlineText.arrowMC.gotoAndStop("off");
- }
- else
- {
- bodyLinkMC.contentFF.textColor = SECTION_COLOR50;
- bodyLinkMC.arrowMC.gotoAndStop("off");
- }
- }
- else
- {
- var mc = eval("mc_t_" + num);
- mc.titleFF.textColor = DEFAULT_COLOR;
- }
- }
- function printImage(strFile)
- {
- var _loc2_ = strFile;
- if(System.capabilities.os.toUpperCase().indexOf("MAC OS 9") != -1)
- {
- lingo("Flsh_alert \"Sorry, this functionality is not available on Mac OS 9\"");
- }
- else
- {
- var _loc1_ = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/" + IMAGE_PATH;
- imgPrint = false;
- nmWaitID = setInterval(this,"checkImage",500);
- mc_image.printImageMC.loadMovie(_loc1_ + _loc2_);
- }
- }
- function checkImage()
- {
- if(mc_image.printImageMC._height > 0 && !imgPrint)
- {
- imgPrint = true;
- clearInterval(nmWaitID);
- getURL("printasbitmap:",mc_image.printImageMC);
- }
- }
- _root.core = this;
- Links = {};
- Tardis.sideMenu.EB.addListener(this);
- stop();
- _visible = false;
- TEXT_POS = 10;
- CONTENT_POS = 0;
- positioned = false;
- onReady();
- this.onUnload = function()
- {
- removeLinkListener();
- clearInterval(intervalID);
- clearInterval(nmWaitID);
- this.onUnload = null;
- };
- bodyLinkMC.btn.onRelease = function()
- {
- this._parent._parent.txtUp(this._parent);
- };
- bodyLinkMC.btn.onRollOver = function()
- {
- this._parent._parent.txtOver(this._parent);
- };
- bodyLinkMC.btn.onRollOut = function()
- {
- this._parent._parent.txtOut(this._parent);
- };
-